<?php

//管理后台
Route::group(['prefix' => 'admin'], function(){
	/*登录展示*/
	Route::get('/login', '\App\Admin\Controllers\LoginController@index');
	/*登录行为*/
	Route::post('/login', '\App\Admin\Controllers\LoginController@login');
	/*登出*/
	Route::get('/logout', '\App\Admin\Controllers\LoginController@logout');

	Route::group(['middleware' => ['auth:admin', 'menu', 'authAdmin']], function () {
		/*首页*/
		Route::get('/home', ['as' => 'admin.index', 'uses' => '\App\Admin\Controllers\HomeController@index']);
		Route::get('/lock_screen', ['as' => 'admin.lock', 'uses' => '\App\Admin\Controllers\HomeController@lockScreen']);
		Route::post('/lock_screen', ['as' => 'admin.lock', 'uses' => '\App\Admin\Controllers\HomeController@unlock']);
		/*管理人员*/
		Route::get('/users', ['as' => 'admin.users.index', 'uses' => '\App\Admin\Controllers\UserController@index']);
		Route::get('/users/search', ['as' => 'admin.users.index', 'uses' => '\App\Admin\Controllers\UserController@index']);
		Route::get('/users/create', ['as' => 'admin.users.create', 'uses' => '\App\Admin\Controllers\UserController@create']);
		Route::get('/users/delete/{user}', ['as' => 'admin.users.create', 'uses' => '\App\Admin\Controllers\UserController@delete']);
		Route::get('/users/batch_delete', ['as' => 'admin.users.create', 'uses' => '\App\Admin\Controllers\UserController@batchDelete']);
		Route::post('/users/store', ['as' => 'admin.users.create', 'uses' => '\App\Admin\Controllers\UserController@store']);
		Route::get('/users/role/{user}', ['as' => 'admin.users.role', 'uses' => '\App\Admin\Controllers\UserController@role']);
		Route::post('/users/role/{user}', ['as' => 'admin.users.role', 'uses' => '\App\Admin\Controllers\UserController@storeRole']);
		/*角色*/
		Route::get('/roles', ['as' => 'admin.roles.index', 'uses' => '\App\Admin\Controllers\RoleController@index']);
		Route::get('/roles/search', ['as' => 'admin.roles.index', 'uses' => '\App\Admin\Controllers\RoleController@index']);
		Route::get('/roles/delete/{role}', ['as' => 'admin.roles.delete', 'uses' => '\App\Admin\Controllers\RoleController@delete']);
		Route::get('/roles/batch_delete', ['as' => 'admin.roles.delete', 'uses' => '\App\Admin\Controllers\RoleController@batchDelete']);
		Route::get('/roles/create', ['as' => 'admin.roles.create', 'uses' => '\App\Admin\Controllers\RoleController@create']);
		Route::post('/roles/store', ['as' => 'admin.roles.create', 'uses' => '\App\Admin\Controllers\RoleController@store']);
		Route::get('/roles/permission/{role}', ['as' => 'admin.roles.permission', 'uses' => '\App\Admin\Controllers\RoleController@permission']);
		Route::post('/roles/permission/{role}', ['as' => 'admin.roles.permission', 'uses' => '\App\Admin\Controllers\RoleController@storePermission']);
		/*权限*/
		Route::get('/permissions', ['as' => 'admin.permissions.index', 'uses' => '\App\Admin\Controllers\PermissionController@index']);
		Route::get('/permissions/search', ['as' => 'admin.permissions.index', 'uses' => '\App\Admin\Controllers\PermissionController@index']);
		Route::get('/permissions/create', ['as' => 'admin.permissions.create', 'uses' => '\App\Admin\Controllers\PermissionController@create']);
		Route::post('/permissions/store', ['as' => 'admin.permissions.create', 'uses' => '\App\Admin\Controllers\PermissionController@store']);
		Route::get('/permissions/edit/{permission}', ['as' => 'admin.permissions.edit', 'uses' => '\App\Admin\Controllers\PermissionController@edit']);
		Route::post('/permissions/edit/{permission}', ['as' => 'admin.permissions.edit', 'uses' => '\App\Admin\Controllers\PermissionController@editStore']);
		Route::get('/permissions/delete/{permission}', ['as' => 'admin.permissions.delete', 'uses' => '\App\Admin\Controllers\PermissionController@delete']);
		Route::get('/permissions/sub_permission/{permission}', ['as' => 'admin.permissions.edit', 'uses' => '\App\Admin\Controllers\PermissionController@subPermission']);
		Route::get('/permissions/sub_search/{permission}', ['as' => 'admin.permissions.edit', 'uses' => '\App\Admin\Controllers\PermissionController@subPermission']);
		/*用户数统计*/
		Route::get('/users_new/index', ['as' => 'admin.users_new.index', 'uses' => '\App\Admin\Controllers\UserAccountController@newIndex']);//日新增用户
		Route::get('/users_new/view/{user}', ['as' => 'admin.users_new.view', 'uses' => '\App\Admin\Controllers\UserAccountController@view']);//用户详情
		Route::get('/users_new/game_record/{user}', ['as' => 'admin.users_new.view', 'uses' => '\App\Admin\Controllers\UserAccountController@gameRecord']);//游戏记录
		Route::get('/users_new/game_detail', ['as' => 'admin.users_new.view', 'uses' => '\App\Admin\Controllers\UserAccountController@gameDetail']);//游戏详情
		Route::get('/users_new/cost_record/{user}', ['as' => 'admin.users_new.view', 'uses' => '\App\Admin\Controllers\UserAccountController@costRecord']);//消费详情

		/*群管理*/
		Route::get('/wx_helper/index', ['as' => 'admin.wx_helper.index', 'uses' => '\App\Admin\Controllers\WxController@groupList']);//群列表
		Route::get('/wx_helper/add_group', ['as' => 'admin.wx_helper.add', 'uses' => '\App\Admin\Controllers\WxController@create']);//新增微信群
		Route::post('/wx_helper/add_group', ['as' => 'admin.wx_helper.add', 'uses' => '\App\Admin\Controllers\WxController@store']);//保存微信群
		/*公众号消息管理*/
		Route::get('/wx_message/index', ['as' => 'admin.wx_message.index', 'uses' => '\App\Admin\Controllers\WxmsgController@index']);//消息列表
		Route::get('/wx_message/create', ['as' => 'admin.wx_message.add', 'uses' => '\App\Admin\Controllers\WxmsgController@create']);//新增消息
		Route::post('/wx_message/create', ['as' => 'admin.wx_message.add', 'uses' => '\App\Admin\Controllers\WxmsgController@store']);//新增消息
		Route::get('/wx_message/edit/{message}', ['as' => 'admin.wx_message.add', 'uses' => '\App\Admin\Controllers\WxmsgController@edit']);//编辑消息
		Route::post('/wx_message/edit/{message}', ['as' => 'admin.wx_message.add', 'uses' => '\App\Admin\Controllers\WxmsgController@restore']);//编辑消息
		Route::get('/wx_message/toggle/{message}', ['as' => 'admin.wx_message.add', 'uses' => '\App\Admin\Controllers\WxmsgController@toggle']);//切换状态
		Route::get('/wx_message/del/{message}', ['as' => 'admin.wx_message.add', 'uses' => '\App\Admin\Controllers\WxmsgController@delete']);//删除信息
		/*公众平台用户*/
		Route::get('/wx_public_user/index', ['as' => 'admin.wx_public_user.index', 'uses' => '\App\Admin\Controllers\WxmsgController@publicUser']);//公众平台用户
		Route::get('/wx_public_user/toggle/{user}', ['as' => 'admin.wx_public_user.add', 'uses' => '\App\Admin\Controllers\WxmsgController@userToggle']);//公众平台用户切换状态
		Route::get('/wx_public_user/msg_log/{user}', ['as' => 'admin.wx_public_user.add', 'uses' => '\App\Admin\Controllers\WxmsgController@msgLog']);//用户日志记录
		Route::get('/wx_public_user/sync_user', ['as' => 'admin.wx_public_user.add', 'uses' => '\App\Admin\Controllers\WxmsgController@syncUser']);//同步用户数据

		/*每日统计*/
		Route::get('/user_statistic/index', ['as' => 'admin.user_statistic.index', 'uses' => '\App\Admin\Controllers\StatisticController@userIndex']);//每日用户
		Route::get('/user_statistic/filter', ['as' => 'admin.user_statistic.filter', 'uses' => '\App\Admin\Controllers\StatisticController@filter']);//用户筛选
		Route::get('/game_statistic/index', ['as' => 'admin.game_statistic.index', 'uses' => '\App\Admin\Controllers\StatisticController@gameIndex']);//每日游戏
		Route::get('/game_statistic/filter', ['as' => 'admin.game_statistic.filter', 'uses' => '\App\Admin\Controllers\StatisticController@gameFilter']);//游戏筛选
		Route::get('/game_statistic/detail', ['as' => 'admin.game_statistic.detail', 'uses' => '\App\Admin\Controllers\StatisticController@gameDetail']);//游戏详情
		Route::get('/charge_statistic/index', ['as' => 'admin.charge_statistic.index', 'uses' => '\App\Admin\Controllers\StatisticController@chargeIndex']);//每日充值
		Route::get('/charge_statistic/filter', ['as' => 'admin.charge_statistic.filter', 'uses' => '\App\Admin\Controllers\StatisticController@chargeFilter']);//充值筛选

		/*游戏代理*/
		Route::get('/agent/apply', ['as' => 'admin.agent_apply.index', 'uses' => '\App\Admin\Controllers\AgentController@index']);//申请列表
		Route::get('/agent/remove_apply/{agent}', ['as' => 'admin.agent_apply.delete', 'uses' => '\App\Admin\Controllers\AgentController@remove']);//删除申请
		Route::get('/agent/assign_card/{agent}', ['as' => 'admin.agent_apply.assign', 'uses' => '\App\Admin\Controllers\AgentController@assignCard']);//分配房卡
		Route::post('/agent/assign_card/{agent}', ['as' => 'admin.agent_apply.assign', 'uses' => '\App\Admin\Controllers\AgentController@storeCard']);//分配房卡
		Route::get('/agent/assign_log/{agent}', ['as' => 'admin.agent_apply.assign', 'uses' => '\App\Admin\Controllers\AgentController@assignLog']);//接收记录
		Route::get('/agent/send_log/{agent}', ['as' => 'admin.agent_apply.assign', 'uses' => '\App\Admin\Controllers\AgentController@sendLog']);//分配记录
		Route::get('/agent/index', ['as' => 'admin.agent.index', 'uses' => '\App\Admin\Controllers\AgentController@list']);//代理列表
		Route::get('/agent/second_list/{agent}', ['as' => 'admin.agent_list.second', 'uses' => '\App\Admin\Controllers\AgentController@secondList']);//二级代理列表
		Route::get('/agent/audit/{aagent}', ['as' => 'admin.agent_apply.audit', 'uses' => '\App\Admin\Controllers\AgentController@audit']);//代理审核
		Route::post('/agent/audit/{agent}', ['as' => 'admin.agent_apply.audit', 'uses' => '\App\Admin\Controllers\AgentController@auditStore']);//代理审核
		Route::post('/agent/applylist', ['as' => 'admin.agent_list', 'uses' => '\App\Admin\Controllers\AgentController@list']);//已通过代理
		Route::get('/agent/open_circle/{agent}', ['as' => 'admin.agent.circle', 'uses' => '\App\Admin\Controllers\AgentController@openCircle']);//开启会员亲友圈
		Route::post('/agent/open_circle/{agent}', ['as' => 'admin.agent.circle', 'uses' => '\App\Admin\Controllers\AgentController@storeCircle']);//开启会员亲友圈
		Route::get('/agent/set_divide/{agent}', ['as' => 'admin.agent.circle', 'uses' => '\App\Admin\Controllers\AgentController@setDivide']);//设置提成
		Route::post('/agent/set_divide/{agent}', ['as' => 'admin.agent.circle', 'uses' => '\App\Admin\Controllers\AgentController@storeDivide']);//设置提成
		Route::get('/agent/dvlp_users/{agent}', ['as' => 'admin.agent.dvlp', 'uses' => '\App\Admin\Controllers\AgentController@dvlpUsers']);//发展的玩家
		Route::get('/agent/dvlp_load/{agent}', ['as' => 'admin.agent.dvlp', 'uses' => '\App\Admin\Controllers\AgentController@dvlpLoad']);//加载发展的玩家
		Route::get('/agent/gems_log/{agent}', ['as' => 'admin.agent.gems', 'uses' => '\App\Admin\Controllers\AgentController@gemsLog']);//房卡记录
		Route::get('/agent/circle_log/{agent}', ['as' => 'admin.agent.gems', 'uses' => '\App\Admin\Controllers\AgentController@circleLog']);//亲友圈统计
		Route::get('/circle_log/filter/{agent}', ['as' => 'admin.agent.gems', 'uses' => '\App\Admin\Controllers\AgentController@circleLogFilter']);//亲友圈统计筛选

		/*提现*/
		Route::get('/withdraw/list', ['as' => 'admin.withdraw.index', 'uses' => '\App\Admin\Controllers\WithdrawController@index']);//提现列表
		Route::get('/withdraw/remove/{withdraw}', ['as' => 'admin.withdraw.remove', 'uses' => '\App\Admin\Controllers\WithdrawController@remove']);//提现列表
		Route::get('/withdraw/audit/{withdraw}', ['as' => 'admin.withdraw.audit', 'uses' => '\App\Admin\Controllers\WithdrawController@audit']);//提现审核
		Route::post('/withdraw/audit/{withdraw}', ['as' => 'admin.withdraw.audit', 'uses' => '\App\Admin\Controllers\WithdrawController@docash']);//提现审核
		Route::get('/withdraw/source/{withdraw}', ['as' => 'admin.withdraw.source', 'uses' => '\App\Admin\Controllers\WithdrawController@source']);//收入来源
		Route::get('/withdraw/load_source/{withdraw}', ['as' => 'admin.withdraw.source', 'uses' => '\App\Admin\Controllers\WithdrawController@loadSource']);//加载来源
		Route::get('/withdraw/check/{withdraw}', ['as' => 'admin.withdraw.source', 'uses' => '\App\Admin\Controllers\WithdrawController@check']);//金额检查
		/*提现记录*/
		Route::get('/withdraw_log/index', ['as' => 'admin.withdraw_log.index', 'uses' => '\App\Admin\Controllers\WithdrawController@log']);//提现记录

		/*全网通知*/
		Route::get('/broadcast/index', ['as' => 'admin.broadcast.index', 'uses' => '\App\Admin\Controllers\BroadcastController@index']);//通知列表
		Route::get('/broadcast/create', ['as' => 'admin.broadcast.create', 'uses' => '\App\Admin\Controllers\BroadcastController@create']);//新增通知
		Route::post('/broadcast/create', ['as' => 'admin.broadcast.create', 'uses' => '\App\Admin\Controllers\BroadcastController@store']);//新增通知
		Route::get('/broadcast/edit/{cast}', ['as' => 'admin.broadcast.edit', 'uses' => '\App\Admin\Controllers\BroadcastController@edit']);//编辑通知
		Route::post('/broadcast/edit/{cast}', ['as' => 'admin.broadcast.edit', 'uses' => '\App\Admin\Controllers\BroadcastController@restore']);//编辑通知
		Route::get('/broadcast/delete/{cast}', ['as' => 'admin.broadcast.delete', 'uses' => '\App\Admin\Controllers\BroadcastController@delete']);//删除通知
		Route::post('/broadcast/delete/{cast}', ['as' => 'admin.broadcast.delete', 'uses' => '\App\Admin\Controllers\BroadcastController@remove']);//删除通知
		Route::get('/broadcast/voice/{cast}', ['as' => 'admin.broadcast.voice', 'uses' => '\App\Admin\Controllers\BroadcastController@voice']);//发送通知
		Route::post('/broadcast/voice/{cast}', ['as' => 'admin.broadcast.voice', 'uses' => '\App\Admin\Controllers\BroadcastController@doVoice']);//发送通知
		Route::get('/broadcast/log/{cast}', ['as' => 'admin.broadcast.log', 'uses' => '\App\Admin\Controllers\BroadcastController@log']);//发送日志
		Route::get('/broadcast/log_page/{cast}', ['as' => 'admin.broadcast.log', 'uses' => '\App\Admin\Controllers\BroadcastController@logPage']);//发送日志
		/*世界杯竞猜*/
		Route::get('/worldcup/index', ['as' => 'admin.worldcup.index', 'uses' => '\App\Admin\Controllers\WorldcupController@index']);//比赛列表
		Route::get('/worldcup/create', ['as' => 'admin.worldcup.add', 'uses' => '\App\Admin\Controllers\WorldcupController@create']);//新增比赛
		Route::post('/worldcup/create', ['as' => 'admin.worldcup.add', 'uses' => '\App\Admin\Controllers\WorldcupController@store']);//新增比赛
		Route::get('/worldcup/edit/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@edit']);//编辑比赛
		Route::post('/worldcup/edit/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@restore']);//编辑比赛
		Route::get('/worldcup/result/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@result']);//发放奖励
		Route::post('/worldcup/result/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@sendResult']);//发放奖励
		Route::get('/worldcup/begin_guess/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@beginGuess']);//开始竞猜
		Route::get('/worldcup/edit_reward/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@editMatch']);//设置奖励
		Route::post('/worldcup/edit_reward/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@storeReward']);//设置奖励
		Route::get('/worldcup/send_voice', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@sendVoice']);//消息通知
		Route::get('/worldcup/endmsg', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@endMsg']);//消息通知检测
		Route::get('/worldcup/ptcp_detail/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@ptcpDetail']);//竞猜用户详情
		Route::get('/worldcup/win_detail/{match}', ['as' => 'admin.worldcup.edit', 'uses' => '\App\Admin\Controllers\WorldcupController@winDetail']);//获奖用户详情
		
		Route::get('/worldchampion/index', ['as' => 'admin.worldchampion.index', 'uses' => '\App\Admin\Controllers\WorldcupController@champion']);//冠军竞猜
		Route::get('/worldchampion/send_msg', ['as' => 'admin.worldchampion.send', 'uses' => '\App\Admin\Controllers\WorldcupController@championMessage']);//发送消息
		Route::get('/worldchampion/endmsg', ['as' => 'admin.worldchampion.send', 'uses' => '\App\Admin\Controllers\WorldcupController@championMsgEnd']);//消息发送完毕

		/*红包记录*/
		Route::get('/red_packet/index', ['as' => 'admin.red_packet.index', 'uses' => '\App\Admin\Controllers\RedPacketController@index']);//红包列表
		Route::get('/red_packet/remove/{packet}', ['as' => 'admin.red_packet.remove', 'uses' => '\App\Admin\Controllers\RedPacketController@remove']);//删除记录
		Route::get('/red_packet/detail/{packet}', ['as' => 'admin.red_packet.detail', 'uses' => '\App\Admin\Controllers\RedPacketController@detail']);//删除记录

		/*超级代理*/
		Route::get('/superagent_audit/index', ['as' => 'admin.superagent_audit.index', 'uses' => '\App\Admin\Controllers\SuperAgentController@auditIndex']);//超级代理,申请列表
		Route::get('/superagent/index', ['as' => 'admin.superagent.index', 'uses' => '\App\Admin\Controllers\SuperAgentController@index']);//超级代理列表
		Route::get('/superagent/audit/{agent}', ['as' => 'admin.superagent.audit', 'uses' => '\App\Admin\Controllers\SuperAgentController@audit']);//审核代理
		Route::post('/superagent/audit/{agent}', ['as' => 'admin.superagent.audit', 'uses' => '\App\Admin\Controllers\SuperAgentController@storeAudit']);//审核代理
		Route::get('/superagent/assign_card/{agent}', ['as' => 'admin.superagent.audit', 'uses' => '\App\Admin\Controllers\SuperAgentController@assignCard']);//分配房卡
		Route::post('/superagent/assign_card/{agent}', ['as' => 'admin.superagent.audit', 'uses' => '\App\Admin\Controllers\SuperAgentController@storeCard']);//分配房卡
		Route::get('/superagent/assign_log/{agent}', ['as' => 'admin.superagent.audit', 'uses' => '\App\Admin\Controllers\SuperAgentController@assignLog']);//分配记录
		Route::get('/superagent/junior_earn/{agent}', ['as' => 'admin.superagent.audit', 'uses' => '\App\Admin\Controllers\SuperAgentController@juniorEarn']);//下级绩效
		
		
		

	});
});


?>